#include "Log.h"


//static variables
CLog*	CLog::m_instance = NULL;


CLog::CLog()
{

}


CLog::~CLog()
{

}


void CLog::InitLogger()
{
	m_logFileName = "log.txt";
	std::ofstream LogFile(m_logFileName);

	LogFile<<"CasGE Log File"<<std::endl<<std::endl;
	
	LogFile.close();
}


void CLog::CloseLogger()
{
	SAFE_DELETE(m_instance);
}


void CLog::WriteToLog(char* eventStr, char* file, int line, char* func)
{
	if(eventStr != NULL)
	{
		std::ofstream LogFile(m_logFileName, std::ios::app);

		LogFile<<">>  "<<eventStr<<std::endl;

		LogFile.close();
	}
}